﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XNOgre.Graphics
{
    /// <summary>
    /// Parameters that are supplied from the engine, for use in Shaders(Effects)
    /// </summary>
    public enum GpuProgramParameter
    {
        /// <summary>
        /// The current world matrix.
        /// </summary>
        WorldMatrix,
        /// <summary>
        /// The current world matrix, inverted.
        /// </summary>
        InverseWorldMatrix,
        /// <summary>
        /// Provides transpose of world matrix.
        /// </summary>
        TransposeWorldMatrix,
        /// <summary>
        /// Current world matrix, inverted & transposed.
        /// </summary>
        InverseTransposeWorldMatrix,

        /// <summary>
        /// The current view matrix.
        /// </summary>
        ViewMatrix,
        /// <summary>
        /// The current view matrix, inverted.
        /// </summary>
        InverseViewMatrix,
        /// <summary>
        /// Provides transpose of view matrix.
        /// </summary>
        TransposeViewMatrix,
        /// <summary>
        /// Provides inverse transpose of view matrix.
        /// </summary>
        InverseTransposeViewMatrix,

        /// <summary>
        /// The current projection matrix.
        /// </summary>
        ProjectionMatrix,
        /// <summary>
        /// Provides inverse of projection matrix
        /// </summary>
        InverseProjectionMatrix,
        /// <summary>
        /// Provides transpose of projection matrix.
        /// </summary>
        TransposeProjectionMatrix,
        /// <summary>
        /// Provides inverse transpose of projection matrix
        /// </summary>
        InverseTransposeProjectionMatrix,

        /// <summary>
        /// The current view & projection matrices concatenated.
        /// </summary>
        ViewProjMatrix,
        /// <summary>
        /// Provides inverse of cancatend view and projection matrices.
        /// </summary>
        InverseViewProjMatrix,
        /// <summary>
        /// Provides transpose of concatenated view and projection matrices.
        /// </summary>
        TransposeViewProjMatrix,
        /// <summary>
        /// Provides inverse transpose of concatenated view and projection matrices.
        /// </summary>
        InverseTransposeViewProjMatrix,

        /// <summary>
        /// The current world & view matrices concatenated.
        /// </summary>
        WorldViewMatrix,
        /// <summary>
        /// The current world & view matrices concatenated, then inverted.
        /// </summary>
        InverseWorldViewMatrix,
        /// <summary>
        /// The current world & view matrices concatentated, then inverted.
        /// </summary>
        TransposeWorldViewMatrix,
        /// <summary>
        /// The current world & view matrices concatenated, then inerted & transposed.
        /// </summary>
        InverseTransposeWorldViewMatrix,

        /// <summary>
        /// The current world, view, & projection matrices concatenated.
        /// </summary>
        WorldViewProjMatrix,
        /// <summary>
        /// Provides inverse of concatenated world, view, and projection matrices.
        /// </summary>
        InverseWorldViewProjMatrix,
        /// <summary>
        /// Provides transpose of concatenated world, view, and projection matrices.
        /// </summary>
        TransposeWorldViewProjMatrix,
        /// <summary>
        /// Provides inverse transpose of concatenated world, view, and projection matrices.
        /// </summary>
        InverseTransposeWorldViewProjMatrix,

        /// <summary>
        /// Fog color
        /// </summary>
        FogColor,
        /// <summary>
        /// Fog params, Vector3 containing the following values:
        /// Start, End, 1/(end-start)
        /// </summary>
        FogParams,

        /// <summary>
        /// Surface ambient color, as set in Pass.Ambient
        /// </summary>
        SurfaceAmbientColor,
        /// <summary>
        /// Surface diffuse color, as set in Pass.Diffuse
        /// </summary>
        SuraceDiffuseColor,
        /// <summary>
        /// Surface specular color, as set in Pass.Specular
        /// </summary>
        SurfaceSpecularColor,
        /// <summary>
        /// Surface emissive color, as set in Pass.Emissive
        /// </summary>
        SurfaceEmissiveColor,
        /// <summary>
        /// Surface shininess, as set in Pass.SpecularPower
        /// </summary>
        SurfaceShininess,

        /// <summary>
        /// Number of active light sources
        /// </summary>
        LightCount,
        /// <summary>
        /// The ambient light color set in the scene.
        /// </summary>
        AmbientLightColor,
        /// <summary>
        /// Light diffuse color, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightDiffuseColor,
        /// <summary>
        /// Light specular color, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightSpecularColor,
        /// <summary>
        /// Light attenuation parameters, Vector4(range, constant, linear, quadric), index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightAttenuation,
        /// <summary>
        /// Spotlight parameters, Vector3(innerFactor, outerFactor, isSpot) innerFactor and outerFactor are cos(angle/2) the isSpot parameter is 0.0f for non-spotlights, 1.0f for spotlights
        /// </summary>
        SpotLightParams,

        /// <summary>
        /// A light position in world space, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightPosition,
        /// <summary>
        /// A light position in object space, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightPositionObjectSpace,
        /// <summary>
        /// A light positioni n view space, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightPositionViewSpace,
        
        /// <summary>
        /// A light direction in world space, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightDirection,
        /// <summary>
        /// A light direction in object space, index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightDirectionObjectSpace,
        /// <summary>
        /// A light direction in view space,  index determined by ShaderParameter.AutoConstant
        /// </summary>
        LightDirectionViewSpace,
        /// <summary>
        /// The distance of the light from the center of the object a useful approximation as an alertanive to per-vertex distance calculations.
        /// </summary>
        LightDistanceObjectSpace,
        /// <summary>
        /// Array of light diffuse colors, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightDiffuseColorArray,
        /// <summary>
        /// Array of light specular colors, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightSpecularColorArray,
        /// <summary>
        /// Array of light attenuation parameters, Vector4(range, constant, linear, quadric),  count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightAttenuationArray,
        /// <summary>
        /// Array of light positions in world space, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightPositionArray,
        /// <summary>
        /// Array of light positions in object space, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightPositionObjectSpaceArray,
        /// <summary>
        /// Array of light position in view space, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightPositionViewSpaceArray,

        /// <summary>
        /// Array of light directions in world space, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightDirectionArray,
        /// <summary>
        /// Array of light directions in object space, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightDirectionObjectSpaceArray,
        /// <summary>
        /// Array of light directions in view space, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightDirectionViewSpaceArray,
        /// <summary>
        /// Array of distances of the lights from the center of the object, a useful approximation as an alternative to per-vertex distance calculations.
        /// </summary>
        LightDistanceObjectSpaceArray,
        /// <summary>
        /// The derived ambient light color, with 'r', 'g', 'b' components filled with product of surface ambient color, and light ambient color, respectively, 
        /// and 'a' component filled with surface ambient alpha component.
        /// </summary>
        DerivedAmbientLightColor,
        /// <summary>
        /// The derived scene color, with 'r', 'g', and 'b' components filled with sum of derived ambient lighth color andn surface emissive color, respectively, and 'a' component filled with surface diffuse alpha component.
        /// </summary>
        DerivedSceneColor,
        /// <summary>
        /// The derived light diffuse color, index determined with ShaderParameter.AutoConstant, with 'r', 'g', 'b' component filled with product of surface diffuse color, and light diffuse color, respectively and, 'a' component filled with surface diffuse alpha component
        /// </summary>
        DerivedLightDiffuseColor,
        /// <summary>
        /// The derived light specular color, index determined with ShaderParameter.AutoConstant, with 'r', 'g' and 'b' components filled with product of surface specular color, and light specular color, respectively, and 'a' component filled with surface specular alpha component.
        /// </summary>
        DerivedLightSpecularColor,
        /// <summary>
        /// Array of derived light diffuse colors, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        DerivedLightDiffuseColorArray,
        /// <summary>
        /// Array of derived light specular colors, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        DerivedLightSpecularColorArray,

        /// <summary>
        /// Returns (int) 1 if the given light casts shadows, 0 otherwise, count set by ShaderParameter.AutoArrayCount
        /// </summary>
        LightCastsShadows,
        
        /// <summary>
        /// The current camera's position in world space.
        /// </summary>
        CameraPosition,
        /// <summary>
        /// The current camera's position in object space.
        /// </summary>
        CameraPositionObjectSpace,

        /// <summary>
        /// Current viewport width (in pixels) as floating point value.
        /// </summary>
        ViewportWidth,
        /// <summary>
        /// Current viewport height (in pixels) as floating point value..
        /// </summary>
        ViewportHeight,
        /// <summary>
        /// This variable represents 1.0/ViewportWidth
        /// </summary>
        InverseViewportWidth,
        /// <summary>
        /// This variable represents 1.0/ViewportHeight
        /// </summary>
        InverseViewportHeight,
        /// <summary>
        /// Vector4(ViewportWidth,ViewportHeight,InverseViewportWidth,InverseViewportHeight)
        /// </summary>
        ViewportSize,

        /// <summary>
        /// Field of view as a floating point value.
        /// </summary>
        FOV,
        /// <summary>
        /// This variable provides the near clip distance as a floating point value.
        /// </summary>
        NearClipDistance,
        /// <summary>
        /// This variable provides the far clip distance as a floating point value.
        /// </summary>
        FarClipDistance


    }
}
